home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / wireless.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  9.3 KB  |  270 lines

  1. ∩╗┐<%@ Language=VBScript CODEPAGE=65001 %>
  2. <!--#include file="include/wmsLocStrings.inc"-->
  3. <!--#include file="include/wmsCommon.inc"-->
  4. <!--#include file="include/wmsHeader.inc"-->
  5. <!--#include file="include/wmsPageBanner.inc"-->
  6. <!--#include file="include/wmsServerHash.inc"-->
  7. <!--#include file="include/wmsPlugins.inc"-->
  8. <!--#include file="include/wmsError.inc"-->
  9. <%
  10. '+-------------------------------------------------------------------------
  11. '
  12. '  Microsoft Windows Media
  13. '  Copyright (C) Microsoft Corporation. All rights reserved.
  14. '
  15. '  File:       Wireless.asp
  16. '
  17. '  Contents:
  18. '
  19. '--------------------------------------------------------------------------
  20.  
  21. ConnectToServer
  22. ConnectToPubPoint
  23.  
  24. Dim strTitleString
  25. Dim strHelpString
  26. Dim dwDisplayMode
  27. Dim strPackets
  28. Dim strOp
  29.  
  30. Dim dwFECPackets
  31.  
  32. Const SHOWING_FEC = 0
  33.  
  34. dwDisplayMode = SHOWING_FEC
  35.  
  36. if( IsEmpty( g_objPubPoint ) ) then
  37.     Server.Transfer( "pubpoint_collection.asp" )
  38. end if
  39.  
  40. strOp = RemoveDangerousCharacters( qs("op") )
  41. strPackets = RemoveDangerousCharacters( GetFormStr("packets") )
  42.  
  43. BeginErrorHandling
  44. dwPPType = g_objPubPoint.Type
  45. dwFECPackets = g_objPubPoint.limits.FECPacketSpan
  46.  
  47. dwDisplayMode = SHOWING_FEC
  48.  
  49. if( 0 < Len( strOp ) ) then
  50.     if( 0 = StrComp( strOp, "disable", vbTextCompare ) ) then
  51.         g_objPubPoint.EnableFEC = FALSE
  52.         Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance & "&ppID=" & g_strPubPointID )
  53.         Response.Flush
  54.     elseif( 0 = StrComp( strOp, "enable", vbTextCompare ) ) then
  55.         g_objPubPoint.EnableFEC = TRUE
  56.         Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance & "&ppID=" & g_strPubPointID )
  57.         Response.Flush
  58.     end if
  59. end if
  60.         
  61. if( "" <> strPackets ) then
  62.     if( ( 0 < CDbl( strPackets ) ) and ( 24 >= CDbl( strPackets ) ) ) then
  63.         g_objPubPoint.limits.FECPacketSpan = strPackets
  64.     end if
  65.     if( 0 = err.number ) then
  66.         Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer &  "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance )
  67.     end if
  68. elseif( 0 <> StrComp( "properties", strOp, vbTextCompare ) ) then
  69.     Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer &  "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance )
  70. end if
  71.  
  72. if( SHOWING_FEC = dwDisplayMode ) then
  73.     strTitleString = L_FECPROPPAGENAME_TEXT
  74.     if( "" = strPackets ) then
  75.         dwFECPackets = g_objPubPoint.limits.FECPacketSpan
  76.     else
  77.         dwFECPackets = strPackets
  78.     end if
  79.  
  80.     strHelpString = L_FECPROPPAGEHELP_TEXT
  81. end if
  82.  
  83. WriteHTMLHeader( Server.HTMLEncode( g_strDecodedInstance ) ) %>
  84. <% WritePluginJSUtils %>
  85. <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
  86. <script language="JavaScript">
  87. <!--
  88. /*@cc_on @*/
  89. var g_bInvalidEntryWarningShown = false;
  90. var g_bMaxSizeExceededWarnShown = false;
  91.  
  92. //////////////////////////////////////////////////////////////////////////
  93. function ValidatePacketSpan( theEditBox )
  94. {
  95.     <% jsTRY %>
  96.         if( ! theEditBox )
  97.         {
  98.             return false;
  99.         }
  100.  
  101.         var dwPktSpanEntry = 0;
  102.             
  103.         if( isNaN( theEditBox.value ) )
  104.         {
  105.             var szPktColor = new String( document.pluginForm.packets.style.color );
  106.  
  107.             //
  108.             // IE uses standard HTML color values; Netscape 6.x uses rgb colors
  109.             //
  110.             if( ( ! g_bInvalidEntryWarningShown ) && ( ( szPktColor == "#000000" ) || ( szPktColor == "" ) || ( szPktColor == "rgb(0,0,0)" ) ) )
  111.             {
  112.                 g_bInvalidEntryWarningShown = true;
  113.                 window.alert( "<%= RemoveDangerousCharacters( L_INVALIDENTRY_TEXT ) %>" );
  114.             }
  115.             document.pluginForm.packets.style.color = "#ff0000";
  116.             document.forms.pluginForm.ok.disabled = true;
  117.             return true;
  118.         }
  119.         else
  120.         {
  121.             g_bInvalidEntryWarningShown = false;
  122.         }
  123.         
  124.         dwPktSpanEntry = new Number( theEditBox.value );
  125.  
  126.         if( 24 < dwPktSpanEntry )
  127.         {
  128.             if( ! g_bMaxSizeExceededWarnShown )
  129.             {
  130.                 g_bMaxSizeExceededWarnShown = true;
  131.                 window.alert( "<%= RemoveDangerousCharacters( L_FECPKTSPANTOOBIG_TEXT ) %>" );
  132.             }
  133.             theEditBox.value = "24";
  134.             document.pluginForm.packets.style.color = "#000000";
  135.             document.forms.pluginForm.ok.disabled = false;
  136.             return true;
  137.         }
  138.  
  139.         if( 0 == dwPktSpanEntry )
  140.         {
  141.             document.pluginForm.packets.style.color = "#000000";
  142.             document.forms.pluginForm.ok.disabled = true;
  143.             return false;
  144.         }
  145.         
  146.         if( 0 > dwPktSpanEntry )
  147.         {
  148.             theEditBox.value = "0";
  149.             document.pluginForm.packets.style.color = "#000000";
  150.             document.forms.pluginForm.ok.disabled = true;
  151.             return false;
  152.         }
  153.  
  154.         document.pluginForm.packets.style.color = "#000000";
  155.         document.forms.pluginForm.ok.disabled = false;
  156.         return false;
  157.     <% jsCATCH %>
  158. }
  159. -->
  160. </script>
  161. </head>
  162. <body class="pluginbody" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
  163. <% DrawPropPageBanner strTitleString %>
  164. <table width="90%">
  165. <tr>
  166.     <td valign="top">
  167.  
  168.         <% WriteStdPluginForm %>
  169.         
  170.         <table class="propgroupbox" width="90%" cellspacing="0" cellpadding="3">
  171.         <tr>
  172.             <td>
  173.                 <div class="helptext"><%= Server.HTMLEncode( strHelpString ) %></div><br>
  174.             </td>
  175.         </tr>
  176.         <tr>
  177.             <td>
  178.         <%
  179.         if ( SHOWING_FEC = dwDisplayMode ) then
  180.         %>
  181.                 <table cellspacing="1" cellpadding="0" border="0">
  182.                 <tr>
  183.                     <td>
  184.                         <%= Server.HTMLEncode( L_FECPKTSPERSPAN_TEXT ) %>
  185.                     </td>
  186.                     <td>
  187.                          
  188.                     </td>
  189.                     <td>
  190.                     <input type="text" 
  191.                            name="packets" 
  192.                            value="<%= Server.HTMLEncode( dwFECPackets ) %>"
  193.                            tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>  
  194.                            onChange="JavaScript:ValidatePacketSpan( this );"
  195.                            onPaste="JavaScript:ValidatePacketSpan( this );"
  196.                            onKeyUp="JavaScript:ValidatePacketSpan( this );"
  197.                            >
  198.                     </td>
  199.                 </tr>
  200.                 </table>
  201.  
  202.                 <table cellspacing="1" cellpadding="0" border="0">
  203.                 <tr>
  204.                     <td>
  205.                          <br>
  206.                         <table class="defaultcursor" cellspacing="2" cellpadding="2" border="1" cols="3">
  207.                         <tr>
  208.                             <td align="left">
  209.                                 <table class="defaultcursor" cellspacing="2" cellpadding="2" border="0" cols="3">
  210.                                 <tr>
  211.                                     <td align="left" width="32">
  212.                                         <img src="img/wmstip_32.gif" height="32" width="32">
  213.                                     </td>
  214.                                     <td align="left">
  215.                                         <span class="helptext"><%= Server.HTMLEncode( L_FECTIP_TEXT ) %></span>
  216.                                     </td>
  217.                                     <td align="right">
  218.                                          
  219.                                     </td>
  220.                                 </tr>
  221.                                 </table>
  222.                             </td>
  223.                         </tr>
  224.                         </table>
  225.                     </td>
  226.                 </tr>
  227.                 </table>
  228.             </td>
  229.         </tr>
  230.         </table>
  231.         <%
  232.         end if %>
  233.     </td>
  234. </tr>
  235. <tr>
  236.     <td valign=bottom>
  237.         <input type="submit" align="baseline" name="ok" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>  value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>"> 
  238.         <input type="button" align="baseline" name="cancel" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>  onclick="JavaScript:Cancel()" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>"> 
  239.         <input type="button" align="baseline" name="help" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>  onclick="JavaScript:DoPluginHelp( '<%= H_WIRELESSHELPTOPIC %>' )" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id="help">
  240.     </td>
  241. </tr>
  242. </table>
  243. </font>
  244. </form>
  245.  
  246. <% if ( SHOWING_FEC = dwDisplayMode ) then %>
  247. <script language="JavaScript">
  248. <!--
  249. /*@cc_on @*/
  250.     <% jsTRY %>
  251.         document.pluginForm.packets.focus();
  252.     <% jsCATCH %>
  253. -->
  254. </script>
  255. <% end if
  256.  
  257. AlertUserWithPopupErrorDialog
  258. OnErrorGoBack 
  259. DrawCopyrightInfo
  260. DrawStdFooter
  261. %>
  262. </body>
  263. </html>
  264. <% 
  265. LatchCurrentPage "pubpoints/wireless.asp", qs
  266. EndErrorHandling "Wireless.asp" 
  267.  
  268. PluginsASPCleanup
  269. %>
  270.